<template>
  <div>
    首页 {{ fatherNum }}<Num v-model="fatherNum" />
    <hr>

    {{ $t('home') }}
    <el-button @click="langbtn">语言切换</el-button>
    <el-button v-fullscreen>全屏切换</el-button>
    <hr>
    <el-calendar v-model="value" />
  </div>
</template>

<script>
import vueFullScreen from 'vue-fullscreen'
import Vue from 'vue'
import cookieJS from 'js-cookie'
import router from '@/router'
Vue.use(vueFullScreen)
export default {
  name: '',
  data() {
    return {
      fatherNum: 1,
      // fullscreen: false
      value: new Date()
    }
  },
  computed: {},
  created() {},
  methods: {
    // 语言切换
    langbtn() {
      const Arr = ['zh', 'en']
      const _index = Arr.indexOf(this.$i18n.locale)
      this.$i18n.locale = Arr[1 - _index]
      cookieJS.set('lang', Arr[1 - _index])
      console.log(this.$i18n.locale)
      router.go(0)
    }
    // 全屏切换
    // btnClick() {
    //   // this.fullscreen = !this.fullscreen
    //   this.$fullscreen.toggle()
    // }
  }
}
</script>
<style lang="scss" scoped></style>
